<?php
$mysqli = new mysqli();
$mysqli->connect("localhost" ,"user","pass");
$the_database = "questionario";
$table ="questionario";
echo '<h2>DATABASE: '.$the_database.'</h2>';
$mysqli->select_db($the_database);
	echo '<table border="1" cellpadding="5" width="600">';
	echo '<tr><td colspan="4" bgcolor="silver"><b>TABLE: '.$table.'</b></td></tr>';
	echo '<tr><td bgcolor="silver">NAME</td><td bgcolor="silver">SIZE</td><td bgcolor="silver">TYPE</td><td bgcolor="silver">Flags</td></tr>';
	$rs = $mysqli->query("SELECT * FROM ".$table." WHERE 1=0" );
	if ($mysqli->errno) {
    	echo 'Could not run query: ' . mysql_error();
    	exit;
	}
	while($finfo = $rs->fetch_field()){
		echo '<tr>';
		echo '<td>'.$finfo->name."</td>";
		echo '<td>'.$finfo->length."</td>";
		echo '<td>'.$finfo->type."</td>";
		echo '<td>'.$finfo->flags."</td>";
		echo '</tr>';
	}
	echo '</table><br>';
//}

$mysqli->close();

?>